<?php

class KitchenController extends CController
{
    public $defaultAction='show';

    public function actions()
    {
        return array(
            'show'=>'application.controllers.kitchen.ShowAction',
            'setTitle'=>'application.controllers.kitchen.SetTitleAction',
            'setDescription'=>'application.controllers.kitchen.SetDescriptionAction',
            'setImage'=>'application.controllers.kitchen.SetImageAction',
            'deleteImage'=>'application.controllers.kitchen.DeleteImageAction',
            'setWelcomeMessage'=>'application.controllers.kitchen.SetWelcomeMessageAction',
            'setWelcomeMessageColor'=>'application.controllers.kitchen.SetWelcomeMessageColorAction',
        );
    }

    public function filters()
    {
        return array(
            'accessControl',
        );
    }

    public function accessRules()
    {
        return array(
            array('allow',
                'actions'=>array('show'),
                'users'=>array('*'),
            ),
            array('allow',
                'actions'=>array('setTitle','setDescription','setImage','deleteImage', 'setWelcomeMessage','setWelcomeMessageColor'),
                'users'=>array('@'),
            ),
            array('deny',
                'users'=>array('*'),
            ),
        );
    }    
}